Skip to content

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510

Open
dotnet-bot wants to merge 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557
Open

Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331#8510
dotnet-bot wants to merge 6 commits into
mainfrom
locfiles/3bf4ea69-04e2-4165-90c4-74c004fda557

Conversation

@dotnet-bot
Copy link
Copy Markdown
Collaborator

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.

Copilot AI review requested due to automatic review settings May 22, 2026 16:02
@github-actions github-actions Bot enabled auto-merge (squash) May 22, 2026 16:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This OneLocBuild-generated PR updates Microsoft.Testing.Platform localized XLF resource files under src/Platform/Microsoft.Testing.Platform/Resources/xlf/.

Changes:

  • Removes the TerminalAnsiOptionDescription trans-unit from multiple locale XLF files.
  • Removes the TerminalAnsiOptionInvalidArgument trans-unit from multiple locale XLF files.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf Removes TerminalAnsiOption* trans-units from the Czech locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf Removes TerminalAnsiOption* trans-units from the German locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf Removes TerminalAnsiOption* trans-units from the Spanish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf Removes TerminalAnsiOption* trans-units from the French locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf Removes TerminalAnsiOption* trans-units from the Italian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf Removes TerminalAnsiOption* trans-units from the Japanese locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf Removes TerminalAnsiOption* trans-units from the Korean locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf Removes TerminalAnsiOption* trans-units from the Polish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf Removes TerminalAnsiOption* trans-units from the Portuguese (Brazil) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf Removes TerminalAnsiOption* trans-units from the Russian locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf Removes TerminalAnsiOption* trans-units from the Turkish locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf Removes TerminalAnsiOption* trans-units from the Chinese (Simplified) locale XLF.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf Removes TerminalAnsiOption* trans-units from the Chinese (Traditional) locale XLF.

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Der Telemetrieanbieter ist bereits festgelegt</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">El proveedor de telemetría ya está establecido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Le fournisseur de télémétrie est déjà défini</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Il provider di telemetria è già impostato</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">O provedor de telemetria já está definido</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Поставщик телеметрии уже настроен</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">Telemetri sağlayıcısı zaten ayarlanmış</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">已设置遥测提供程序</target>
<note />
</trans-unit>
<source>Telemetry provider is already set</source>
<target state="translated">遙測提供者已設定</target>
<note />
</trans-unit>
@dotnet-bot dotnet-bot changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981843 Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872 May 22, 2026
@Evangelink
Copy link
Copy Markdown
Member

Localization Synchronization Issue

This PR has a critical synchronization problem between source resources and localized files:

Issue Summary

The OneLocBuild task is deleting TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from all 13 .xlf files, but these resource strings are still actively used in PlatformResources.resx.

Timeline of Events

  1. PR Add --ansi <auto|on|off> CLI option for explicit ANSI control (#5081) #8493 (commit 8359a8a, merged ~hours ago) added the --ansi CLI option and introduced these two resource strings
  2. The strings were added to .xlf files with state="new" (untranslated, pending localization)
  3. This PR removes them from all .xlf files via OneLocBuild cleanup
  4. Problem: The source .resx file still references them for runtime use

Why This Will Break

The --ansi option implementation loads these strings at runtime:

  • TerminalAnsiOptionDescription - shown in --help output
  • TerminalAnsiOptionInvalidArgument - shown when user provides invalid argument

For non-English locales, the ResourceManager will fail to find these keys after this PR merges, causing either:

  • Fallback to English (breaking the localized user experience)
  • Missing resource exceptions in strict resource loading modes

Recommended Resolution

Option A (Preferred if --ansi is shipping):

  1. Close this PR or revert these deletions
  2. Keep the state="new" entries in .xlf files until they're properly translated
  3. Coordinate with the OneLocBuild pipeline to process these strings

Option B (If --ansi is being removed):

  1. First remove TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument from PlatformResources.resx
  2. Then let OneLocBuild clean up the orphaned .xlf entries in a subsequent PR

Files to Check

Source (still contains the strings):

  • src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx lines 619-627

Usage (references these resource keys):

  • src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
  • src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionArgumentValidator.cs

Dimension 9 (Localization & Resources): BLOCKING issue - source/localized resource mismatch will break non-English users.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M ·

Copy link
Copy Markdown
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Code Review - PR #8510

This automated localization PR contains a critical synchronization bug that will break non-English users of the --ansi CLI option.

Findings Summary

# Dimension Verdict
9 Localization & Resources 🔴 1 BLOCKING

1/21 dimensions with findings (20 dimensions not applicable to localization-only PR)


Critical Finding

  • Localization & Resources — Source .resx contains resource strings that this PR deletes from all .xlf files

Issue Details

The OneLocBuild task is removing TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files. However, the source PlatformResources.resx file still contains and actively uses these resource strings for the --ansi CLI option added in PR #8493 (merged hours before this PR was created).

Impact:

  • The --ansi help text will not be localized for Czech, German, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, Turkish, and Chinese users
  • Error messages for invalid --ansi arguments will fall back to English
  • Violates the "Localization Done Right" principle (Overarching Principle #7)

Root Cause:
These strings were added with state="new" (untranslated) and OneLocBuild's cleanup logic is removing them before they were sent through the translation pipeline. This is a timing issue between feature merges and localization builds.

Resolution Required:
Either (A) retain these entries in .xlf files until properly translated, or (B) if the --ansi feature is being removed, delete the strings from PlatformResources.resx first.


Review Methodology

This review applied the 21-dimension expert-reviewer framework. Dimensions 1-8, 10-21 are not applicable to this PR as it only modifies localization files. Dimension 9 (Localization & Resources) was evaluated in depth and revealed the critical bug described above.

See inline comment on PlatformResources.cs.xlf:822 for full technical details and verification steps.

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

  • de80fc4 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Expert Code Review (on open) for issue #8510 · ● 8.7M

<source>Telemetry provider is already set</source>
<target state="translated">Zprostředkovatel telemetrie je už nastavený.</target>
<note />
</trans-unit>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BLOCKING] Localization & Resources (Dimension 9)

This PR deletes the TerminalAnsiOptionDescription and TerminalAnsiOptionInvalidArgument translation units from all 13 localized .xlf files, but the source PlatformResources.resx file still contains these resource strings.

Concrete failing scenario:

  1. User launches test executable with locale set to Czech (cs), German (de), or any other localized language
  2. Help text or error message attempts to load TerminalAnsiOptionDescription or TerminalAnsiOptionInvalidArgument
  3. The ResourceManager cannot find these keys in the .xlf files (because this PR deleted them)
  4. Result: Either fallback to English text (breaking localized experience) or MissingManifestResourceException

Root cause:
These strings were added in commit 8359a8a (PR #8493) with state="new" (untranslated), never sent to the localization pipeline, and are now being incorrectly deleted by OneLocBuild's cleanup logic.

Impact:

Recommendation:

  1. Do not merge this PR in its current state
  2. Retain these translation units in all .xlf files (even with state="new")
  3. Ensure the localization pipeline processes these strings for the next release
  4. OR: If these strings are truly being removed from the codebase, remove them from PlatformResources.resx first, then allow OneLocBuild to clean up the .xlf files

Verification:

# Source .resx still contains these strings:
grep -A2 "TerminalAnsiOption" src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx

# But this PR deletes them from all .xlf files
git diff main -- src/Platform/Microsoft.Testing.Platform/Resources/xlf/*.xlf | grep "TerminalAnsiOption"

@dotnet-bot dotnet-bot changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2981872 Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315 May 23, 2026
Copilot AI review requested due to automatic review settings May 23, 2026 03:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
Copilot AI review requested due to automatic review settings May 23, 2026 03:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

<trans-unit id="AvoidAssertsInCatchBlocksDescription">
<source>Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</source>
<target state="new">Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. The rule also flags 'throw new AssertFailedException(...)' and 'throw new AssertInconclusiveException(...)' (the desugared forms of 'Assert.Fail' and 'Assert.Inconclusive'). 'Assert.Inconclusive' (and 'throw new AssertInconclusiveException(...)') is exempt when used inside a filtered catch ('catch (...) when (...)'), because demoting a caught failure to an Inconclusive outcome is the only use case that cannot be expressed without a catch block. For other intentional bypasses (for example, attaching a runtime-built message to the failure), suppress the diagnostic with '#pragma warning disable MSTEST0058'.</target>
<target state="translated">Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. Reguła oznacza również „throw new AssertFailedException(...)” i „throw new AssertInconclusiveException(...)” (usunięte formy „Assert.Fail” i „Assert.Inconclusive”). Element „Assert.Inconclusive” (i „throw new AssertInconclusiveException(...)”) jest wykluczony, gdy jest używany wewnątrz przefiltrowanego polecenia catch („catch (...) when (...)”), ponieważ obniżenie przechwyconego błędu do niejednoznacznego wyniku jest jedynym przypadkiem użycia, którego nie można wyrazić bez bloku catch. W przypadku innych celowych obejść (na przykład dołączenia komunikatu utworzonego w środowisku uruchomieniowym do awarii) pomiń diagnostykę za pomocą polecenia „#pragma ostrzeżenie wyłącz MSTEST0058”.</target>
<trans-unit id="AzureDevOpsLivePublishingFinalizeWaitTimedOut">
<source>Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</source>
<target state="new">Azure DevOps live publishing timed out after {0} waiting for {1} participant file(s); finalizing the run anyway.</target>
<target state="translated">Azure DevOps: время ожидания публикации в реальном времени истекло после {0} ожидания файлов участника ({1}) ; запуск будет завершен в любом случае.</target>
@dotnet-bot dotnet-bot changed the title Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982315 Localized file check-in by OneLocBuild Task: Build definition ID 1218: Build ID 2982331 May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants